
import java.util.List;

import monitoreo.Estadistica;
import monitoreo.Resumen;

/**
 *
 * @author Esteban Czelada
 */
public class PermutarString extends Tarea {

    long desde;
    long hasta;
    String base;

    PermutarString(String indice, Estadistica est, long d, long h, String b, Resumen resumen, boolean debug) { //List li) {
        super(indice, est, resumen, debug);
        desde = d;
        hasta = h;
        base = b;
    }

    @Override
    public void loop() {
        String low;
        String high;
        int n = base.length();

        StringBuffer buffer = new StringBuffer(base);
        startMonitor();
        for (long i = desde; i <= hasta; i++) {
            buffer.reverse();
            getEst().incCantProc();
        }
        endMonitor();
    }
}
